home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / include / fsCmd.h < prev    next >
C/C++ Source or Header  |  1991-06-07  |  6KB  |  164 lines

  1. /*
  2.  * fsCmd.h --
  3.  *
  4.  *    Definitions used by fs command, a general hook into the filesystem.
  5.  *
  6.  * Copyright 1985 Regents of the University of California
  7.  * All rights reserved.
  8.  *
  9.  *
  10.  * $Header: /sprite/src/lib/include/RCS/fsCmd.h,v 1.10 91/05/30 13:22:18 shirriff Exp $ SPRITE (Berkeley)
  11.  */
  12.  
  13. #ifndef _FSCMD
  14. #define _FSCMD
  15.  
  16.  
  17. /*
  18.  * Flags to the Fs_Command system call.
  19.  *    This is invoked via
  20.  *        status = Fs_Command(command, bufSize, buffer);
  21.  *    
  22.  *    FS_PREFIX_LOAD        Load a prefix into the prefix table.  The
  23.  *                serverID is used to find the server of
  24.  *                the prefix. A serverID of FS_NO_SERVER
  25.  *                will cause a broadcast to find the server
  26.  *                when the first file under that prefix is opened.
  27.  *                (This is mainly needed because Unix servers
  28.  *                don't have Remote Links.)
  29.  *    FS_PREFIX_EXPORT    Export a prefix.  The buffer argument to
  30.  *                Fs_Command is a Fs_TwoPaths struct of which
  31.  *                the first path indicates the local directory
  32.  *                to be exported and the second is its global
  33.  *                prefix.  For dot-dot out the top to be caught
  34.  *                the local file should be the root of a domain.
  35.  *                (This restriction could be fixed.)
  36.  *    FS_PREFIX_CLEAR        Clear the server information about a prefix.
  37.  *                A broadcast will occur the next time the
  38.  *                prefix is used to find the server.
  39.  *    FS_PREFIX_DELETE    Delete a prefix from the table.  Not even
  40.  *                the prefix itself remains.
  41.  *    FS_PREFIX_CONTROL    Control which clients a prefix is exported to
  42.  *    FS_RAISE_MIN_CACHE_SIZE    Set the minimum number of pages in the cache.
  43.  *    FS_LOWER_MAX_CACHE_SIZE    Set the maximum number of pages in the cache.
  44.  *    FS_DISABLE_FLUSH    Disbable automatic flushing of the cache.
  45.  *    FS_SET_TRACING        Set file system tracing flag.
  46.  *    FS_SET_CACHE_DEBUG    Set cache debugging flag.
  47.  *    FS_SET_RPC_DEBUG    Set rpc debugging flag.
  48.  *    FS_SET_RPC_TRACING    Set rpc tracing flag.
  49.  *    FS_SET_RPC_NO_TIMEOUTS    Set rpc_NoTimeouts flag.
  50.  *    FS_SET_NAME_CACHING    Set name caching flag.
  51.  *    FS_SET_CLIENT_CACHING    Set client caching flag.
  52.  *    FS_SET_RPC_CLIENT_HIST    Set client call histgram flag
  53.  *    FS_SET_RPC_SERVER_HIST    Set service-time histogram flag
  54.  *    FS_EMPTY_CACHE        Reset the filesystem cache by writing it
  55.  *                out and invalidating all unlock blocks.
  56.  *    FS_RETURN_STATS        Copy out the filesystem statistics
  57.  *    FS_RETURN_LIFE_TIMES    Copy out the file life time statistics
  58.  *    FS_SET_NO_STICKY_SEGS    Set the no sticky segments flag.
  59.  *    FS_SET_CLEANER_PROCS    Set the maximum number of block cleaner
  60.  *                processes.
  61.  *    FS_SET_READ_AHEAD    Set number of blocks of read ahead.
  62.  *    FS_SET_RA_TRACING    Set read ahead tracing flag.
  63.  *    FS_SET_WRITE_THROUGH    Set the flag that forces write-through.
  64.  *    FS_SET_WRITE_BACK_ON_CLOSE    Set the flag that forces write-back-
  65.  *                    on-close.
  66.  *    FS_SET_DELAY_TMP_FILES    Set the flag that uses a fully delayed write
  67.  *                policy on tmp files. 
  68.  *    FS_SET_TMP_DIR_NUM    Set the directory which contains temporary
  69.  *                files.
  70.  *    FS_SET_WRITE_BACK_INTERVAL    Set the number of seconds to delay
  71.  *                    before writing back the cache.
  72.  *    FS_SET_WRITE_BACK_ASAP        Set the flag to force write-back
  73.  *                    as soon as possible.
  74.  *    FS_SET_WB_ON_LAST_DIRTY_BLOCK    Set the flag to force write-back
  75.  *                    as last dirty block from client.
  76.  *    FS_SET_BLOCK_SKEW        Set number of blocks to put between
  77.  *                    consecutive allocations on disk.
  78.  *    FS_SET_LARGE_FILE_MODE        Set flag that limits the number of
  79.  *                    blocks for large files.
  80.  *    FS_SET_MAX_FILE_PORTION        Set value to divide the maximum
  81.  *                    number of blocks by to determine the
  82.  *                    maximum file size.
  83.  *    FS_SET_DELETE_HISTOGRAMS    Set the flag to keep delete size/age
  84.  *                    information.
  85.  *    FS_ZERO_STATS        Set all file system counts to 0.
  86.  *    FS_SET_PDEV_DEBUG    Set pseudo-device debugging flag.
  87.  *    FS_SET_MIG_DEBUG    Set process-migration file debugging flag.
  88.  *    FS_REREAD_SUMMARY_INFO    Update the in-memory copy of the domain summary
  89.  *                information.
  90.  *    FS_FIRST_LFS_COMMAND    Value range for LFS specific commands.
  91.  *    FS_LAST_LFS_COMMAND
  92.  *    FS_DO_L1_COMMAND    Simulate L1-foo.
  93.  */
  94. #define FS_PREFIX_LOAD            1
  95. #define FS_PREFIX_EXPORT        2
  96. #define FS_PREFIX_CLEAR            3
  97. #define FS_PREFIX_DELETE        4
  98. #define FS_PREFIX_CONTROL        5
  99. #define FS_RAISE_MIN_CACHE_SIZE        6
  100. #define FS_LOWER_MAX_CACHE_SIZE        7
  101. #define FS_DISABLE_FLUSH        8
  102. #define    FS_SET_TRACING            9
  103. #define    FS_SET_CACHE_DEBUG        10
  104. #define    FS_SET_RPC_DEBUG        11
  105. #define    FS_SET_RPC_TRACING        12
  106. #define    FS_SET_NAME_CACHING        13
  107. #define    FS_SET_CLIENT_CACHING        14
  108. #define    FS_TEST_CS            15
  109. #define    FS_SET_RPC_CLIENT_HIST        16
  110. #define    FS_SET_RPC_SERVER_HIST        17
  111. #define    FS_EMPTY_CACHE            18
  112. #define FS_RETURN_STATS            19
  113. #define    FS_GET_FRAG_INFO        21
  114. #define FS_SET_NO_STICKY_SEGS        22
  115. #define    FS_SET_CLEANER_PROCS        23
  116. #define    FS_SET_READ_AHEAD        24
  117. #define    FS_SET_RA_TRACING        25
  118. #define FS_SET_RPC_NO_TIMEOUTS        26
  119. #define    FS_SET_WRITE_THROUGH        27
  120. #define    FS_SET_WRITE_BACK_ON_CLOSE    28
  121. #define    FS_SET_DELAY_TMP_FILES        29
  122. #define    FS_SET_TMP_DIR_NUM        30
  123. #define    FS_SET_WRITE_BACK_INTERVAL    31
  124. #define    FS_SET_WRITE_BACK_ASAP        32
  125. #define FS_SET_WB_ON_LAST_DIRTY_BLOCK    33
  126. #define    FS_SET_BLOCK_SKEW        34
  127. #define    FS_SET_LARGE_FILE_MODE        35
  128. #define    FS_SET_MAX_FILE_PORTION        36
  129. #define    FS_SET_DELETE_HISTOGRAMS    37
  130. #define    FS_ZERO_STATS            38
  131. #define    FS_SET_PDEV_DEBUG        39
  132. #define    FS_SET_MIG_DEBUG        40
  133. #define FS_RETURN_LIFE_TIMES        41
  134. #define FS_REREAD_SUMMARY_INFO        42
  135. #define FS_DO_L1_COMMAND        43
  136. #define FS_FIRST_LFS_COMMAND           100
  137. #define    FS_CLEAN_LFS_COMMAND           101
  138. #define    FS_SET_CONTROL_FLAGS_LFS_COMMAND 102
  139. #define FS_GET_CONTROL_FLAGS_LFS_COMMAND 103
  140. #define FS_FREE_FILE_NUMBER_LFS_COMMAND 104
  141. #define    FS_LAST_LFS_COMMAND           199
  142.  
  143. /*
  144.  * Structure used with the FS_PREFIX_CONTROL command.  A particular client
  145.  * can be added or deleted from the export list of the prefix.  The delete
  146.  * argument should be FALSE to add, TRUE to delete.  Remember that an
  147.  * empty export list allows all clients access.
  148.  */
  149. typedef struct Fs_PrefixControl {
  150.     int clientID;        /* SpriteID of client to add/delete */
  151.     Boolean delete;        /* TRUE means delete, FALSE means add */
  152.     char prefix[FS_MAX_PATH_NAME_LENGTH];    /* The prefix to control */
  153. } Fs_PrefixControl;
  154.  
  155. /* Structure used with the FS_PREFIX_LOAD command. The prefix should be
  156.  * loaded with the given serverID. 
  157.  */
  158. typedef struct Fs_PrefixLoadInfo {
  159.     char prefix[FS_MAX_PATH_NAME_LENGTH];    /* Prefix to load. */
  160.     int  serverID;                /* Server of prefix. */
  161. } Fs_PrefixLoadInfo;
  162.  
  163. #endif /* _FSUSER */
  164.